/*

core : 
      create controller 
      controller.initialize
      CameraController -> takePicture
                       -> startVideoRecording


      get camera description of cellphone -> CameraController
      availableCameras to get description

      controller.addListener -> mounted ->setState 
      update the element tree 
      when controller != null

      after controller updated the UI tree will update as well

      cameraPreview

      gitconfig changed

      


*/

import 'package:camera/camera.dart';
import 'package:path_provider/path_provider.dart';

List<CameraDescription> descriptions;
void main() async {
  descriptions = await availableCameras();
  for (CameraDescription description in descriptions) {
    CameraController controller =
        CameraController(description, ResolutionPreset.high, enableAudio: true);
    controller.takePicture(getTemporaryDirectory().toString());
  }
}
